﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Node_Save.aspx.cs" Inherits="TRPOP.CMS.Web.Admin.Node_Save" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>站点管理-<%=base.m_strBaseAdminPageName%></title>
    <script src="../../js/utils.js" type="text/javascript"></script>
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script src="../js/jquery.form.js" type="text/javascript"></script>
    <script src="../js/admin_site.js" type="text/javascript"></script>
    <script src="../../js/pinyin.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="panel_main" runat="server">
        <script language="javascript" type="text/javascript">
            $(document).ready(function() {
                bind();
                ContentPubTypeView('<%=m_NodeInfo.ContentPubTypeId %>');
                <%if (m_id == 0){ %>
                $("#txtName").blur(function () {
                    $('#txtKeyWord').val(pinyin.go($("#txtName").val(),2));
                });
                <%}%>
            });
        </script>
        <!-- 当前位置 开始 -->
        <!--
        <table id="page_navigator">
            <tr>
                <td>
                   
                    当前位置：站点管理 ->
                    <%=TRPOP.Common.RequestHelper.RequestInt("nodeid") > 0 ? "编辑" : "新增"%>
                    结点
                    
                </td>
            </tr>
        </table>
        -->
        <!-- 当前位置 结束 -->
        <!-- 原来的多个tab型的设置选项 开始 -->
        <div style="height: 5px;">
            &nbsp;</div>
        <table class="table_tab" id="table_tab" runat="server">
            <tr class="tr_tab">
                <td style="width: 65px; background-color: #2A7AD2 !important" id="baseinfo_tab">
                    <a href="javascript:showtool('baseinfo');">基本参数</a>
                </td>
                <th style="width: 1px;">
                    &nbsp;
                </th>
                <td style="width: 65px;" id="seoandother_tab">
                    <a href="javascript:showtool('seoandother');">高级设置</a>
                </td>
                <th>
                    &nbsp;&nbsp;
                </th>
            </tr>
        </table>
        <!-- 结点信息设置 开始 -->
        <table class="table_form" style="border-top: 2px solid #2A7AD2;" id="baseinfo">
            <!-- 基本参数 begin -->
            <tr>
                <th width="20%">
                    <%=m_id > 0 ? "结点位置" : "父结点"%>
                </th>
                <td>
                    &nbsp;<%=m_strParentName%>
                </td>
            </tr>
            <tr <%if (m_id <= 0){ %>style="display:none" <%}%>>
                <th width="20%">
                    结点ID
                </th>
                <td>
                    &nbsp;<%=m_id%>
                </td>
            </tr>
            <tr id="tr_ddlNodeTypeId" runat="server" visible="false">
                <th>
                    结点类型
                </th>
                <td>
                    <cms:DropDownList runat="server" ID="ddlNodeTypeId" DataTextField="Name" AutoPostBack="true"
                        DataValueField="NodeTypeId" OnSelectedIndexChanged="ddlNodeTypeId_SelectedIndexChanged">
                    </cms:DropDownList>
                </td>
            </tr>
            <tr>
                <th>
                    结点名称
                </th>
                <td>
                    <cms:TextBox ID="txtName" TabIndex="3" runat="server" required="1" prompt="结点名称"
                        valuelength="200" MaxLength="200" Width="200"></cms:TextBox>
                    <span class="FontWarn">*</span>
                </td>
            </tr>
            <tr>
                <th>
                    结点唯一标识符
                </th>
                <td>
                    <cms:TextBox ID="txtKeyWord" TabIndex="2" runat="server" required="1" valuetype="EnKong"
                        prompt="标识符" valuelength="100" MaxLength="100" Width="200"></cms:TextBox>
                    <span class="FontWarn">*</span>
                    <%=m_id > 0 ? "" : "一旦保存将不可再更改"%>
                </td>
            </tr>
            <tbody id="node_source" class="hide" style="display: none">
                <tr>
                    <th>
                        资源发布点
                    </th>
                    <td>
                        <cms:TextBox prompt="资源发布点" runat="server" ID="txtSourcePSN" MaxLength="300" required="1" />
                        <a href="javascript:show_dialog('../AdminSelect.aspx?roottype=psn&extname=&setid=txtSource&selpath=',450,230,'选择资源发布点');">
                            选择目录</a> <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        资源发布URL
                    </th>
                    <td>
                        <cms:TextBox prompt="资源发布URL" runat="server" ID="txtSourceUrl" MaxLength="300" required="1" />
                        <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        资源发布目录规则
                    </th>
                    <td>
                        <cms:TextBox runat="server" ID="txtSourceRootReg" MaxLength="500" Width="50px" />
                        <cms:DropDownList runat="server" ID="ddlSourceRootReg" DataTextField="key" DataValueField="value" />
                    </td>
                </tr>
            </tbody>
            <tr>
                <th>
                    水印图片
                </th>
                <td>
                    <cms:TextBox prompt="水印图片" runat="server" ID="TxtWaterpic" MaxLength="300" />
                    <cms:HiddenField runat="server" ID="TxtWaterpicroot" />
                    <a href="javascript:tplSelectRootImg($('#TxtWaterpic').val(),this.from,'TxtWaterpic');"
                        id="a1">选择文件</a>
                </td>
            </tr>
            <tr>
                <th>
                    内容编辑器
                </th>
                <td>
                    <cms:DropDownList runat="server" ID="ddlEditor" DataTextField="VarKey" DataValueField="VarValue"
                        required="1" prompt="内容编辑器" />
                </td>
            </tr>
            <tr>
                <th>
                    内容分页生成器
                </th>
                <td>
                    <cms:DropDownList runat="server" ID="ddlPager" DataTextField="VarKey" DataValueField="VarValue"
                        required="1" prompt="内容分页生成器" />
                </td>
            </tr>
            <tr id="tr_ddlModelId" runat="server" visible="false">
                <th>
                    内容模型套用
                </th>
                <td>
                    <cms:DropDownList ID="ddlModelId" TabIndex="1" runat="server" prompt="所属内容模型" DataTextField="Name"
                        DataValueField="ModelId">
                    </cms:DropDownList>
                    <%=m_id > 0 ? "" : "一旦选择将不可再更改"%>
                </td>
            </tr>
            <tr id="tr_ddlInheritNodeID" runat="server" visible="false">
                <th>
                    实结点继承:
                </th>
                <td>
                    <select name="ddlInheritNodeID" id="ddlInheritNodeID">
                        <%=strOptions  %>
                    </select>
                </td>
            </tr>
            <!-- 基本参数 end -->
            <tr>
                <th>
                    发布模式
                </th>
                <td>
                    <cms:RadioButtonList TabIndex="7" runat="server" ID="rbtnContentPubTypeId" DataTextField="Name"
                        DataValueField="ContentPubTypeId" CellPadding="2" RepeatDirection="Horizontal" />
                </td>
            </tr>
            <tbody id="node_auopub">
                <tr>
                    <th>
                        是否自动发布
                    </th>
                    <td>
                        <cms:RadioButtonList runat="server" ID="rblIsAuoPub" RepeatDirection="Horizontal"
                            RepeatLayout="Flow" CellPadding="5" CellSpacing="3">
                            <asp:ListItem Value="1" Text="是" Selected="True" />
                            <asp:ListItem Value="0" Text="否" />
                        </cms:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <!-- 模板设置 begin -->
            <tbody id="node_publish" class="hide" style="display: none">
                <tr>
                    <th>
                        首页模板
                    </th>
                    <td>
                        <cms:TextBox prompt="首页模板" runat="server" ID="txtIndexTemplate" MaxLength="300" />
                        <cms:HiddenField runat="server" ID="txtIndexTemplateRoot" />
                        <a href="javascript:tplSelect($('#txtIndexTemplate').val(),this.from,'txtIndexTemplate');"
                            id="a_txtIndexTemplate">选择模板</a> <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        内容页模板
                    </th>
                    <td>
                        <cms:TextBox prompt="内容页模板" runat="server" ID="txtDetailTemplate" MaxLength="300" />
                        <cms:HiddenField runat="server" ID="txtDetailTemplateRoot" />
                        <a href="javascript:tplSelect($('#txtDetailTemplate').val(),this.from,'txtDetailTemplate');">
                            选择模板</a> <span class="FontWarn">*</span>
                    </td>
                </tr>
                <cms:Literal ID="ltTemplate" runat="server"><!--  其他的模板设置 -->
                    <tr>
                        <th>
                            {0}
                        </th>
                        <td>
                            <input id="{1}" name="{1}" value="$value1$"  MaxLength="300" type="text" class="txtBlur" onfocus="this.className=&quot;control_focus&quot;" onblur="this.className=&quot;control_blur&quot;" style="width:346px;" />
                            <input id="{1}Root" name="{1}Root" value="$value2$"  MaxLength="300"  type="hidden" />
                            <a href="javascript:tplSelect($('#{1}').val(),this.from,'{1}');">
                                选择模板</a>
                                <span class="FontWarn">*</span>
                        </td>
                    </tr>
                </cms:Literal>
            </tbody>
            <!-- 模板设置 end -->
            <!-- 静态发布设置 begin -->
            <tbody id="node_staticpublish" class="hide" style="display: none">
                <tr>
                    <th>
                        静态内容发布点(PSN)
                    </th>
                    <td>
                        <cms:TextBox prompt=" 静态内容发布点(PSN)" runat="server" ID="txtHtmlPSN" MaxLength="300" />
                        <a href="javascript:show_dialog('../AdminSelect.aspx?roottype=psn&extname=&setid=txtHtml&selpath=',450,230,'选择静态发布点');">
                            选择目录</a> <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        静态内容发布URL
                    </th>
                    <td>
                        <cms:TextBox runat="server" ID="txtHtmlUrl" prompt="   静态内容发布URL" MaxLength="300" />
                        <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        结点首页文件名
                    </th>
                    <td>
                        <cms:TextBox runat="server" prompt=" 结点首页文件名" ID="txtIndexName" MaxLength="300" />
                        <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        静态发布分卷目录结构
                    </th>
                    <td>
                        <cms:TextBox runat="server" ID="txtHtmlRootReg" MaxLength="500" Width="50px" />
                        <cms:DropDownList runat="server" ID="ddlHtmlRootReg" DataTextField="key" DataValueField="value" />
                    </td>
                </tr>
                <tr>
                    <th>
                        内容页面命名规则
                    </th>
                    <td>
                        <cms:TextBox prompt="内容页面命名规则" runat="server" ID="txtHtmlNameReg" MaxLength="500" />
                        <a href="javascript:show_dialog('PublishFileFormat.aspx?setid=txtHtmlNameReg&t='+Math.random(),370,200,'静态文件格式');">
                            设置</a> <span class="FontWarn">*</span>
                    </td>
                </tr>
            </tbody>
            <!-- 静态发布设置 end -->
            <!-- 动态发布设置 begin-->
            <tbody id="node_dynamicpublic" class="hide" style="display: none">
                <tr class="tr_item">
                    <th>
                        结点首页入口URL
                    </th>
                    <td>
                        <cms:TextBox prompt="结点首页入口URL" runat="server" ID="txtIndexPortalURL" MaxLength="300" />
                        <span class="FontWarn">*</span>
                    </td>
                </tr>
                <tr class="tr_item">
                    <th>
                        内容入口URL
                    </th>
                    <td>
                        <cms:TextBox runat="server" prompt=" 内容入口URL" ID="txtContentPortalURL" MaxLength="300" />
                        <span class="FontWarn">*</span>
                    </td>
                </tr>
            </tbody>
            <!-- 动态发布设置 end-->
        </table>
        <!-- 结点信息设置  结束 -->
        <!--高级设置--->
        <table class="table_form hide" style="border-top: 2px solid #2A7AD2;" id="seoandother">
            <tr class="tr_item">
                <th width="20%">
                    SEO_Title
                </th>
                <td>
                    <cms:TextBox ID="txtSEOTitle" MaxLength="150" runat="server"></cms:TextBox>
                    &nbsp; <span class="FontWarn">说明：</span> <span class="sp_tiptitle">调用字段名称：SEOTitle</span>
                </td>
            </tr>
            <tr class="tr_item">
                <th width="20%">
                    SEO_Key
                </th>
                <td style="height: 180px;">
                    <cms:TextBox ID="txtSEOKey" Columns="50" Rows="3" Height="150px" TextMode="MultiLine"
                        runat="server" prompt="描述" valuelength="500" ControlValueType="String"></cms:TextBox>
                    &nbsp; <span class="FontWarn">说明：</span> <span class="sp_tiptitle">调用字段名称：SEOKey</span>
                </td>
            </tr>
            <tr class="tr_item">
                <th width="20%">
                    SEO_Description
                </th>
                <td style="height: 180px;">
                    <cms:TextBox ID="txtSEODescription" Columns="50" Rows="2" Height="150px" TextMode="MultiLine"
                        runat="server" prompt="描述" valuelength="500" ControlValueType="String"></cms:TextBox>
                    &nbsp; <span class="FontWarn">说明：</span> <span class="sp_tiptitle">调用字段名称：txtSEODescription</span>
                </td>
            </tr>
        </table>
        <!--高级设置--->
        <!---->
        <table class="table_form align_c">
            <!-- 确定 等按钮 begin-->
            <tr class="tr_btn">
                <th>
                </th>
                <td id="aaa">
                    <cms:Button CssClass="button_style" ID="btnSubmit" Text="确定" runat="server" OnClick="btnSubmit_Click"
                        OnClientClick="return CheckForm(this.form)&&SelfCheck();" />
                    <input class="button_style" name="reset" value="清除" type="reset" />
                </td>
            </tr>
        </table>
        <!-- 确定 等按钮 end-->
        <!---->
    </div>
    <!-- 结点重新设置后的提示信息 结点重新发布 开始 -->
    <div id="panel_reset" runat="server" visible="false">
        <br />
        <br />
        <br />
        <table width="80%" border="0" cellpadding="20" cellspacing="0" align="center">
            <tr>
                <td align="center" valign="top">
                    <table width="80%" border="0" cellpadding="4" cellspacing="1" class="table_form">
                        <tr class="tr_title">
                            <th height="25">
                                System Information
                            </th>
                        </tr>
                        <tr class="tr_item">
                            <td style="padding-left: 10px; padding-top: 10px" align="left">
                                <img src="../../App_Themes/<%=TRPOP.CMS.Model.SystemInfoHelper.getSystemInfo().CMSThemes%>/images/install-error.gif"
                                    border="0" align="left" />
                                <b><span id="tipmsg" runat="server"></span>，确认对结点内容进行重新发布？</b>
                                <p>
                                    <ul>
                                        <li>重新发布将先取消原有发布内容，然后再进行重新发布。</li>
                                    </ul>
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" height="25">
                                <input type="button" style="height: 25px;" class="button_style" value="   确 认   "
                                    onclick="top.mainwin_Open('../publish/admin_publish_eidt.aspx?ac=resetnode&nodeid=<%=m_id %>');" />&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="button" style="height: 25px;" class="button_style" value="   取 消  "
                                    onclick="top.mainwin_Open('../publish/admin_publish_list.aspx?nodeid=<%=m_id %>');" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <!-- 结点重新设置后的提示信息 结点重新发布 结束 -->
    </form>
</body>
</html>
